<?php
//header("location:/manage/index.php");


$url = "https://open.weixin.qq.com/connect/oauth2/authorize?";
//拼接 AppId
$url .= sprintf("appid=%s&", "wx6a26f16011095354");
//拼接 回调函数
$url .= sprintf("redirect_uri=%s&", urlencode("http://lch.chinacloudsites.cn/login.php"));
$url .= "response_type=code&scope=snsapi_base&";
//拼接 参数
$url .= sprintf("state=%s", "123");
$url .= "#wechat_redirect";

//需要传参数可以放在 session里面
session_start();
$_SESSION["params"] = time() . mt_rand(1000, 9999);

//header("location:" . $url);

